home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
demos
/
GL
/
ideas
/
p.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
4KB
|
167 lines
/*
* Copyright 1992, 1993, 1994, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <gl.h>
float p_data[][2] = {
{1.987500, 11.437500-3.0},
{2.606250, 11.662500-3.0},
{2.887500, 12.150000-3.0},
{3.037500, 11.943750-3.0},
{3.618750, 12.956250-3.0},
{2.793750, 10.256250-3.0},
{3.037500, 8.775000-3.0},
{2.418750, 8.006250-3.0},
{2.381250, 3.656250-3.0},
{1.518750, 2.756250-3.0},
{1.856250, 1.687500-3.0},
{0.975000, 1.087500-3.0},
{1.087500, 0.393750-3.0},
{0.600000, 0.431250-3.0},
{0.018750, 0.037500-3.0},
{3.093750, 9.787500-3.0},
{3.037500, 9.412500-3.0},
{4.050000, 11.231250-3.0},
{4.331250, 11.175000-3.0},
{5.100000, 12.187500-3.0},
{5.137500, 11.906250-3.0},
{5.831250, 12.712500-3.0},
{5.643750, 12.000000-3.0},
{6.656250, 12.731250-3.0},
{5.962500, 11.831250-3.0},
{6.956250, 12.393750-3.0},
{6.112500, 11.512500-3.0},
{7.012500, 11.512500-3.0},
{6.093750, 10.575000-3.0},
{6.787500, 9.993750-3.0},
{5.868750, 9.412500-3.0},
{6.018750, 7.950000-3.0},
{5.193750, 7.256250-3.0},
{5.043750, 6.318750-3.0},
{4.068750, 5.775000-3.0},
{3.881250, 5.418750-3.0},
{3.337500, 5.606250-3.0},
{3.093750, 5.193750-3.0},
{2.868750, 5.793750-3.0},
{2.493750, 5.512500-3.0},
{2.643750, 6.675000-3.0},
};
draw_p() {
bgntmesh();
v2f(p_data[0]);
v2f(p_data[1]);
v2f(p_data[2]);
v2f(p_data[3]);
v2f(p_data[4]);
v2f(p_data[5]);
v2f(p_data[6]);
v2f(p_data[7]);
v2f(p_data[8]);
v2f(p_data[9]);
v2f(p_data[10]);
v2f(p_data[11]);
v2f(p_data[12]);
v2f(p_data[13]);
v2f(p_data[14]);
endtmesh();
bgntmesh();
v2f(p_data[15]);
v2f(p_data[16]);
v2f(p_data[17]);
v2f(p_data[18]);
v2f(p_data[19]);
v2f(p_data[20]);
v2f(p_data[21]);
v2f(p_data[22]);
v2f(p_data[23]);
v2f(p_data[24]);
v2f(p_data[25]);
v2f(p_data[26]);
v2f(p_data[27]);
v2f(p_data[28]);
v2f(p_data[29]);
v2f(p_data[30]);
v2f(p_data[31]);
v2f(p_data[32]);
v2f(p_data[33]);
v2f(p_data[34]);
v2f(p_data[35]);
v2f(p_data[36]);
v2f(p_data[37]);
v2f(p_data[38]);
v2f(p_data[39]);
v2f(p_data[40]);
endtmesh();
bgnline();
v2f(p_data[0]);
v2f(p_data[2]);
v2f(p_data[4]);
v2f(p_data[6]);
v2f(p_data[8]);
v2f(p_data[10]);
v2f(p_data[12]);
v2f(p_data[14]);
v2f(p_data[13]);
v2f(p_data[11]);
v2f(p_data[9]);
v2f(p_data[7]);
v2f(p_data[5]);
v2f(p_data[3]);
v2f(p_data[1]);
v2f(p_data[0]);
endline();
bgnline();
v2f(p_data[15]);
v2f(p_data[17]);
v2f(p_data[19]);
v2f(p_data[21]);
v2f(p_data[23]);
v2f(p_data[25]);
v2f(p_data[27]);
v2f(p_data[29]);
v2f(p_data[31]);
v2f(p_data[33]);
v2f(p_data[35]);
v2f(p_data[37]);
v2f(p_data[39]);
v2f(p_data[40]);
v2f(p_data[38]);
v2f(p_data[36]);
v2f(p_data[34]);
v2f(p_data[32]);
v2f(p_data[30]);
v2f(p_data[28]);
v2f(p_data[26]);
v2f(p_data[24]);
v2f(p_data[22]);
v2f(p_data[20]);
v2f(p_data[18]);
v2f(p_data[16]);
v2f(p_data[15]);
endline();
}